import { createRouter, createWebHashHistory } from 'vue-router'
import Home from '../views/Home.vue'

const routes = [
    {
        path: '/',
        name: 'Home',
        component: Home
    },
    {
        path: '/about',
        name: 'About',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
    },
    {
        path: '/login',
        name: 'login',
        component: () => import(/* webpackChunkName: "login" */ '../views/login.vue')
    },
    {
        path: '/workbench',
        name: 'workbench',
        component: () => import(/* webpackChunkName: "workbench" */ '../views/workbench.vue')
    },
    {
        path: '/xiaokong',
        name: 'xiaokong',
        component: () => import(/* webpackChunkName: "xiaokong" */ '../views/xiaokong/xiaokong.vue')
    },
    {
        path: '/xiaokong2',
        name: 'xiaokong2',
        component: () => import(/* webpackChunkName: "xiaokong2" */ '../views/xiaokong/xiaokong2.vue')
    },
    {
        path: '/handsontable',
        name: 'handsontable',
        component: () => import(/* webpackChunkName: "handsontable" */ '../views/xiaokong/handsontable.vue')
    },
    {
        path: '/baidumap',
        name: 'baidumap',
        component: () => import(/* webpackChunkName: "baidumap" */ '../views/map/baidumap.vue')
    }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router
